package com.bossien.flink.common;

public enum  StreamAndSetEnum {

    DATA_STREAM(0,"流式对象"),
    DATA_SET(1,"批处理对象");

    private Integer code;

    private String message;

    StreamAndSetEnum(int code, String message)
    {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public static StreamAndSetEnum getCode(Integer code) {
        if (null == code) {
            return null;
        }
        switch (code) {
            case 0: {
                return StreamAndSetEnum.DATA_STREAM;
            }
            case 1: {
                return StreamAndSetEnum.DATA_SET;
            }
            default: {
                return null;
            }
        }
    }
}
